<template>
  <div class="tab">
    <ul class="list">
      <li @click="jump('employee1')">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-putao"></use>
        </svg>
        <p>首页</p>
      </li>
      <li @click="jump('employee2')">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-lizi"></use>
        </svg>
        <p>我的</p>
      </li>
    </ul>
  </div>
</template>

<script>
  export default {
    name: "employee_tab",
    methods: {
      jump(index) {
        this.$router.push({
          name: index
        }).catch(err => err)
      }
    }
  }
</script>

<style scoped="scoped">
  ul,
  li,
  p {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .list {
    display: flex;
    width: 100%;
  }

  .list li {
    line-height: 25px;
    text-align: center;
    width: 50%;
    color: lightpink;
  }

  .list li:nth-child(1) {
    border-right: 1px solid lightpink;
  }

  .tab {
    position: fixed;
    bottom: 0;
    width: 100%;
  }

  .icon {
    width: 1.5em;
    height: 1.5em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
</style>
